﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        msg1.Text = "In Page_Load<br/>";


    
    }
    protected void btnEnter_Click(object sender, EventArgs e)
    {
        if(myList.SelectedIndex > 0)
        {
            msg1.Text += "Hi " + name.Text + "<br/>";
            msg1.Text += "   " + password.Text  + "<br/>";
            msg1.Text += myList.SelectedItem;
        }

    }
    protected void myList_SelectedIndexChanged(object sender, EventArgs e)
    {
        //if (myList.SelectedIndex > 0)
        //{
        //    msg1.Text += "Hi " + name.Text + "<br/>";
        //    msg1.Text += "your favorite author is ";
        //    msg1.Text += myList.SelectedItem;
        //}
    }


    
}